<template>
  <fieldset>
    <legend>商品列表</legend>
    <router-link to="/detail/1">方便面</router-link>
    |
    <router-link to="/detail/2">火腿肠</router-link>
    |
    <router-link to="/detail/3">卤蛋</router-link>
    <button @click="jump">点击跳转按钮</button>
  </fieldset>
</template>
<script>
export default {
  mounted() {},
  methods: {
    jump() {
      // this.$router.push("/detail/3");
      // this.$router.push({path:"/detail/2",query:{name:"火腿肠"}})
      // this.$router.push({name:"playlist",params:{name:"韩梅梅"}})
      // this.$router.replace("/discover")
      this.$router.go(-2);
    },
  },
};
</script>
